package com.jf3q.sup.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jf3q.sup.dto.InboundShipmentsDto;
import com.jf3q.sup.service.InboundShipmentsService;
import com.jf3q.sup.vo.InboundShipmentsVo;
import com.jf3q.sup.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: .x77
 * @CreateTime:2024/3/26 9:12
 * @Description:入库管理
 */
@RestController
@RequestMapping("/inboundShipments")
public class InboundShipmentsController {
    @Autowired
    InboundShipmentsService inboundShipmentsService;


    @PostMapping("/getPage")
    public ResultVo getPage(@RequestBody InboundShipmentsDto inboundShipmentsDto){
        try {
            Page<InboundShipmentsVo> inboundShipmentsVoPage = inboundShipmentsService.storagePage(inboundShipmentsDto);

            return ResultVo.success("入库详细分页展示",inboundShipmentsVoPage);
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }

}
